#!/bin/bash


pid=`pgrep wf-recorder -d -D`
status=$?

if [ $status != 0 ]
then
wf-recorder -c h264_vaapi -d /dev/dri/renderD128 --audio=alsa_output.pci-0000_00_1f.3.hdmi-stereo.monitor -o DP-2  -f ~/ScreenNonRecord/$(date +recording_%Y-%m-%d-%H%M%S.mp4);
else
  pkill --signal SIGINT wf-recorder
fi


#pid=`pgrep wf-recorder -d -D`
#status=$?

#if [ $status != 0 ]
#then
#wf-recorder  --audio-codec alsa_output.pci-0000_00_1f.3.hdmi-stereo.monitor -c h264_vaapi -d /dev/dri/renderD128 -o DP-1 -f ~/ScreenNonRecord/-$(date +recording_%Y-%m-%d-%H%M%S.mp4);
#else
#  pkill --signal SIGINT wf-recorder
#fi






